home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / text / tex / tpp410n.lha / TPPGlobal.lha / rexx / tpl / StartGPlainTeX.tpl < prev    next >
Text File  |  1993-01-17  |  2KB  |  60 lines

  1. /* Start German PlainTeX - Macro */
  2. /* Kick 2.0 only */
  3.  
  4. options results
  5.  
  6. binary='TeX:bigbin/virtex'
  7. format='&gplain'
  8. output='>"CON:0/16/700/440/German PlainTex Ausgabe Fenster/AUTO/WAIT/ALT/INACTIVE/SCREENTextPlus"'
  9. hailstring='German PlainTeX Optionen'
  10. wbtofront='TeX:bin/ptofront'
  11.  
  12. address 'TextPlus'
  13.  
  14. /* get name of current file */
  15.  
  16. 'GetName'
  17. compileopts = result
  18.  
  19. 'RequestString' hailstring'\\'compileopts
  20. compileopts = result
  21. n = WORDS(compileopts)
  22. fullname = WORD(compileopts, n)
  23. n = LENGTH(compileopts) - LENGTH(fullname)
  24. compileopts = LEFT(compileopts, n)
  25.  
  26. PARSE VALUE namestruc(fullname) WITH ivol idirs ibase .
  27.  
  28. IF fullname == "" then empty = 'true'
  29.                   else empty = 'false'
  30.  
  31. IF "" == SUBSTR(fullname, 1+ivol+idirs+ibase) THEN DO
  32.         fullname = fullname||".dvi"     /* supply a default extension   */
  33.         ibase = ibase + 4
  34.         END
  35.  
  36. IF 0 = ivol THEN DO
  37.         direc = PRAGMA('d')
  38.         IF RIGHT(direc,1)~='/' & RIGHT(direc,1)~=':' THEN direc=direc||'/'
  39.         fullname = direc||fullname
  40.         DROP direc
  41.         END
  42. ELSE DO
  43.         direc = SUBSTR(fullname, 1, ivol+idirs)
  44.         IF RIGHT(direc,1) = '/' THEN DO
  45.             n = LENGTH(direc)
  46.             direc = LEFT(direc, n-1)
  47.             END
  48.         call pragma 'Directory', direc
  49.      END
  50. DROP ivol idirs ibase
  51.  
  52. /* valid filename/opts ? */
  53. if empty = 'false' then do
  54. /*  address command wbtofront 'Workbench'*/
  55.    address command binary output format compileopts fullname
  56.    end
  57. else
  58.    'Display' 'German PlainTeX --- Abbruch'
  59.  
  60.